package ua.epam.java_bravo.data.dto.pk;

import java.io.Serializable;

/**
 * This class represents the primary key of the HS_Request table.
 */
public class HsRequestPk implements Serializable {
    protected int requestId;

    /**
     * This attribute represents whether the primitive attribute requestId is null.
     */
    protected boolean requestIdNull;

    /**
     * Sets the value of requestId
     */
    public void setRequestId(int requestId) {
        this.requestId = requestId;
    }

    /**
     * Gets the value of requestId
     */
    public int getRequestId() {
        return requestId;
    }

    /**
     * Method 'HsRequestPk'
     */
    public HsRequestPk() {
    }

    /**
     * Method 'HsRequestPk'
     *
     * @param requestId
     */
    public HsRequestPk(final int requestId) {
        this.requestId = requestId;
    }

    /**
     * Sets the value of requestIdNull
     */
    public void setRequestIdNull(boolean requestIdNull) {
        this.requestIdNull = requestIdNull;
    }

    /**
     * Gets the value of requestIdNull
     */
    public boolean isRequestIdNull() {
        return requestIdNull;
    }

    /**
     * Method 'equals'
     *
     * @param _other
     * @return boolean
     */
    public boolean equals(Object _other) {
        if (_other == null) {
            return false;
        }

        if (_other == this) {
            return true;
        }

        if (!(_other instanceof HsRequestPk)) {
            return false;
        }

        final HsRequestPk _cast = (HsRequestPk) _other;
        if (requestId != _cast.requestId) {
            return false;
        }

        if (requestIdNull != _cast.requestIdNull) {
            return false;
        }

        return true;
    }

    /**
     * Method 'hashCode'
     *
     * @return int
     */
    public int hashCode() {
        int _hashCode = 0;
        _hashCode = 29 * _hashCode + requestId;
        _hashCode = 29 * _hashCode + (requestIdNull ? 1 : 0);
        return _hashCode;
    }

    /**
     * Method 'toString'
     *
     * @return String
     */
    public String toString() {
        StringBuffer ret = new StringBuffer();
        ret.append("ua.epam.java_bravo.data.dto.pk.HsRequestPk: ");
        ret.append("requestId=" + requestId);
        return ret.toString();
    }

}
